<template>
  <Input placeholder="请输入验证码" v-model="value">
    <img :src="src" alt="验证码" width="100" height="50" slot="suffix" @click="captcha" />
  </Input>
</template>

<script>
import { captcha } from "@/api/profile";
export default {
  props: {},
  data() {
    return {
      value: "",
      src: ""
    };
  },
  methods: {
    captcha() {
      captcha();
    }
  },
  watch: {
    value() {
      this.$emit("input", this.value);
    }
  }
};
</script>

<style></style>
